import { X } from "x-orm";
import { ProxyMember } from './proxy_member';
import { ProxyUser } from './proxy_user';
import { ProxyMargin } from './proxy_margin';


@X.Entity({
    primary : 'order_id'
})
export class VrOrder{
    order_id;

    order_state;
    term;
    guess;
    caipiao_status;
    caipiao_type;
    s_fee : number;
    f_fee : number;

    buyer_phone;
    add_time;

    @X.OneToOne(VrOrder,ProxyMember,{
        from : item =>item.buyer_phone,
        to : item => item.phone
    })
    proxy_member : ProxyMember;

    from_proxy;

    @X.OneToOne(VrOrder,ProxyUser,{
        from : item => item.from_proxy,
        to : item => item.id
    })
    proxy_parent : ProxyUser;

    
    proxy_margin :ProxyMargin;

    goods_id;
    goods_num;
    order_amount;
    order_sn;
    goods_name;

    buyer_id;
    buyer_name;
    is_cal;

}
